using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

//Importamos
using EventSys.BussinesEntities;

namespace EventSys.Repository.Mapping
{
    public class UbicacionMap : EntityTypeConfiguration<Ubicacion>
    {
        public UbicacionMap()
        {
            // Primary Key
            this.HasKey(t => t.idUbicacion);

            // Properties
            this.Property(t => t.Descripcion)
                .HasMaxLength(200);

            this.Property(t => t.Address)
                .HasMaxLength(200);

            // Table & Column Mappings
            this.ToTable("Ubicacion");
            this.Property(t => t.idUbicacion).HasColumnName("idUbicacion");
            this.Property(t => t.Descripcion).HasColumnName("Descripcion");
            this.Property(t => t.Address).HasColumnName("Address");
            this.Property(t => t.Latitude).HasColumnName("Latitude");
            this.Property(t => t.Longitude).HasColumnName("Longitude");
        }
    }
}
